#include "peopleaddinfo.h"
#include "ui_peopleaddinfo.h"

peopleaddinfo::peopleaddinfo(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::peopleaddinfo)
{
    ui->setupUi(this);
}

peopleaddinfo::~peopleaddinfo()
{
    delete ui;
}

void peopleaddinfo::init(QString ac, QString im, QString na, QString extrame)
{
    account=ac;
    image=im;
    name=na;
    extrames=extrame;
    ui->account->setText(account);
    ui->image->setIcon(QPixmap(im));
    ui->name->setText(name);
    ui->plainTextEdit->setPlainText(extrame);
}

void peopleaddinfo::on_sendbtn_clicked()
{
    qDebug()<<"peopleaddinfo30 apply";
    emit addfriend(true);
    close();
}


void peopleaddinfo::on_deletebtn_clicked()
{
    emit addfriend(false);
    close();
}

